package com.jbit.examSystem.service.impl;

import com.jbit.examSystem.dao.ExamDetailDao;
import com.jbit.examSystem.pojo.ExamDetail;
import com.jbit.examSystem.service.ExamDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
public class ExamDetailServiceImpl implements ExamDetailService {
    @Autowired
    private ExamDetailDao examDetailDao;

    @Override
    public List<ExamDetail> list(int id) {
        return examDetailDao.selectById(id);
    }

    @Override
    public List<ExamDetail> findByScoreId(Integer scoreId) {
        return examDetailDao.selectByScoreId(scoreId);
    }
}
